<?php

require_once(WSB_MODULES_PATH . 'sherpa/models/CategoryGateway.php');
require_once(WSB_MODULES_PATH . 'sherpa/models/ProductGateway.php');

class Sherpa_IndexController extends WSB_Xtension_Extension
{

	/**
	 * @return string
	 */
	public function renderForBackend()
	{
		return get_class($this);
	}

	/**
	 * Index Action
	 */
	public function indexAction()
	{

		$languageId = $this->getLanguageId();

		// Testing
		$gateway = new Sherpa_Model_CategoryGateway();
		$categories = $gateway->fetchAll($languageId);

		$category = $gateway->fetchById(2, $languageId);
		$tree = $gateway->fetchTree($languageId);

		$this->addContent($this->_view->render('index/list.phtml'));
	}

}